package com.ylb.rent.entity.vo;

import com.ylb.rent.entity.*;
import lombok.*;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * @AUTHOR:游李滨
 * @DATE:2023/7/3 9:51
 */
@Data
@ToString
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class RoomVo{
    private static final long serialVersionUID = 1L;
    private Long id;
    private String roomName;
    private String roomNo;
    private BigDecimal price;
    private Long area;
    private Long floor;
    private Long maxFloor;
    private long bedId;
    private Bed bed;
    private Long bathroom;
    private Long publicKitchen;
    private Long privateKitchen;
    private Date lastRenovation;
    private Long apartmentId;
    private Long isDelete;
    private Date fromDate;
    private Date toDate;
    //设施列表
    private List<Stuff> stuffList;
    //图片列表
    private List<String> imageList;
    public Room getRoom(){
        return Room.builder().id(this.id)
                .roomName(this.roomName)
                .roomNo(this.roomNo)
                .price(this.price)
                .area(this.area)
                .floor(this.floor)
                .maxFloor(this.maxFloor)
                .bedId(this.bedId)
                .bathroom(this.bathroom)
                .publicKitchen(this.publicKitchen)
                .privateKitchen(this.privateKitchen)
                .lastRenovation(this.lastRenovation)
                .apartmentId(this.apartmentId)
                .isDelete(this.isDelete).build();
    }
    public void setRoom(Room room){
        this.id=room.getId();
        this.roomName=room.getRoomName();
        this.roomNo=room.getRoomNo();
        this.price=room.getPrice();
        this.area=room.getArea();
        this.floor=room.getFloor();
        this.maxFloor=room.getMaxFloor();
        this.bedId=room.getBedId();
        this.bathroom=room.getBathroom();
        this.publicKitchen=room.getPublicKitchen();
        this.privateKitchen=room.getPrivateKitchen();
        this.lastRenovation=room.getLastRenovation();
        this.apartmentId=room.getApartmentId();
        this.isDelete=room.getIsDelete();
    }

}
